char* sub_string(char* str, char* sub)
{
    int len = strlen(str);

    for (int i = 0; i < len; i++)
    {
        char ch = *(str + i);
        if (ch == *sub)
        {
            char* p = str + i;
            char* p1 = sub;
            while (*p1 != '\0' && *p != '\0')
            {
                if (*p1 != *p)
                    break;
                p1++, p++;
            }
            if (*p1 == '\0')
                return str + i;
        }
    }
    return NULL;
}